import Vue from "vue";
import VueRouter from "vue-router";
// import allRoutes from "./generateRoute"
//静态路由
import staticRoutes from './StaticRoutes'
//动态路由
import dynamicRoute from "./dynamicRoute";


Vue.use(VueRouter);

const routes = [
  // {
  //   path: "/",
  //   component: () => import(/*webpackChunkName:'Home'*/"@/pages/Home"),
  //   children: [
  //     {
  //       path: "/welcome",
  //       component: () => import(/*webpackChunkName:'Welcomeweb'*/"@/pages/Home/Welcome")
  //     },
  //     {
  //       path: '/attendance',
  //       component: () => import(/*webpackChunkName:'Attendance'*/'@/pages/Home/Attendance')
  //     }
  //   ]
  // },
  // {
  //   path: "/login",
  //   component: () => import(/*webpackChunkName:'Login'*/"@/pages/Login")
  // },
  // ...allRoutes,
  ...staticRoutes,
  dynamicRoute

];

const router = new VueRouter({
  routes,
});

export default router;
